$OpenBSD: patch-lib_fileutils_rb,v 1.3 2013/01/23 18:18:41 jeremy Exp $

Make FileUtils.mkdir_p act more like mkdir(1) -p, by not attempting
to create directories that already exist.  This fixes systrace
warnings when building ports.

--- lib/fileutils.rb.orig	Sat Feb 25 00:11:07 2012
+++ lib/fileutils.rb	Thu Jan 17 08:27:13 2013
@@ -205,7 +205,7 @@ module FileUtils
     list.map {|path| path.chomp(?/) }.each do |path|
       # optimize for the most common case
       begin
-        fu_mkdir path, options[:mode]
+        fu_mkdir path, options[:mode] unless File.directory?(path)
         next
       rescue SystemCallError
         next if File.directory?(path)
@@ -218,7 +218,7 @@ module FileUtils
       end
       stack.reverse_each do |dir|
         begin
-          fu_mkdir dir, options[:mode]
+          fu_mkdir dir, options[:mode] unless File.directory?(dir)
         rescue SystemCallError
           raise unless File.directory?(dir)
         end
